import Ax from '../api';

export default {
  roomAdd: (param) => Ax.post(`/roomConfig/add`, param),
  roomImport: (param) => Ax.post(`/roomConfig/import`, param),
  roomClone: (param) => Ax.post(`/roomConfig/clone`, param),
  roomEdit: (param) => Ax.put(`/roomConfig/edit`, param),
  roomDelete: (query) => Ax.delete(`/roomConfig/delete?_id=${query.roomId}`),
  roomShare: (param) => Ax.post(`/roomConfig/share`, param),
  roomList: (param) => Ax.post(`/roomConfig/list`, param),
  roomDetail: (query) => Ax.get(`/roomConfig/detail?_id=${query.roomId}`),
  roomAvailableAssetList: (query) => Ax.get(`/roomConfig/available/assets/list?_id=${query.roomId}`),
  roomAssetList: (query) => Ax.get(`/roomConfig/assets/list?_id=${query.roomId}`),
  roomFileUpdate: (param) => Ax.post(`/roomConfig/file/update`, param),
  roomExport: (query) => Ax.get(`/roomConfig/export?_id=${query.roomId}`),
  roomTemplateList: (param) => Ax.get(`/roomConfig/template/all`),
  // 子页面相关
  roomSubPageEdit: (param) => Ax.put(`/roomConfig/subPage/edit`, param),
  roomSubPageDetail: (query) => Ax.get(`/roomConfig/subPage/detail?roomId=${query.roomId}&subPageId=${query.subPageId}`),
  // 组件应用至房间
  roomApplyComponent: (param) => Ax.post(`/roomConfig/apply/component`, param),
};
